/* Dataset Creation Wizard Styles */

.dataset-wizard-modal .wizard-progress {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.dataset-wizard-modal .wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.dataset-wizard-modal .wizard-step.active {
    opacity: 1;
}

.dataset-wizard-modal .wizard-step.completed {
    opacity: 0.8;
}

.dataset-wizard-modal .wizard-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.15);
    z-index: 0;
}

.dataset-wizard-modal .wizard-step.completed:not(:last-child)::after {
    background: rgba(56, 189, 248, 0.5);
}

.dataset-wizard-modal .step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}

.dataset-wizard-modal .wizard-step.active .step-number {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.dataset-wizard-modal .wizard-step.completed .step-number {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
    color: #22c55e;
}

.dataset-wizard-modal .step-label {
    font-size: 0.75rem;
    text-align: center;
    font-weight: 500;
}

.dataset-wizard-modal .wizard-step.active .step-label {
    color: #38bdf8;
    font-weight: 600;
}

.dataset-wizard-modal .wizard-step-content {
    padding: 1rem 0;
}

.dataset-wizard-modal .backend-card {
    padding: 1.5rem;
    border-radius: 0.5rem;
    background: rgba(32, 36, 50, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.dataset-wizard-modal .backend-card:hover {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(32, 36, 50, 1);
    transform: translateY(-2px);
}

.dataset-wizard-modal .backend-card.selected {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

.dataset-wizard-modal .backend-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.dataset-wizard-modal .backend-card.selected .backend-icon {
    color: #38bdf8;
}

.dataset-wizard-modal .backend-card h6 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Modal overrides for wizard */
.dataset-wizard-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1.5rem;
    overflow-y: auto;
    pointer-events: auto !important;
}

.dataset-wizard-modal {
    background: #1c1f2e;
    border-radius: 0.75rem;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 10000;
    pointer-events: auto !important;
}

.dataset-wizard-modal form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.dataset-wizard-modal .wizard-progress,
.dataset-wizard-modal .modal-header,
.dataset-wizard-modal .modal-footer {
    flex-shrink: 0;
}

.dataset-wizard-modal .modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.dataset-wizard-modal .modal-title {
    margin: 0;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dataset-wizard-modal .modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.dataset-wizard-modal .modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

.dataset-wizard-modal .modal-footer button {
    pointer-events: auto;
}

.dataset-wizard-modal .btn-close {
    background: none;
    border: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dataset-wizard-modal .btn-close:hover {
    color: #fff;
}

.dataset-wizard-modal .btn-close::before {
    content: '×';
    font-size: 1.75rem;
    line-height: 1;
}

/* Alpine.js cloak */
[x-cloak] {
    display: none !important;
}

/* Form elements in wizard */
.dataset-wizard-modal .wizard-step-content .form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.dataset-wizard-modal .wizard-step-content .form-control,
.dataset-wizard-modal .wizard-step-content .form-select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    pointer-events: auto !important;
}

.dataset-wizard-modal .wizard-step-content .form-control:focus,
.dataset-wizard-modal .wizard-step-content .form-select:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: #38bdf8;
    box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.15);
}

.dataset-wizard-modal .wizard-step-content input,
.dataset-wizard-modal .wizard-step-content select,
.dataset-wizard-modal .wizard-step-content button,
.dataset-wizard-modal .wizard-step-content textarea {
    pointer-events: auto !important;
}

.dataset-wizard-modal .wizard-step-content .form-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.dataset-wizard-modal .wizard-step-content .alert-info {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #e0f2fe;
}

/* Dataset queue cards */
.dataset-wizard-modal .wizard-step-content .card {
    background: rgba(32, 36, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dataset-wizard-modal .wizard-step-content .card-body {
    padding: 1rem;
}

/* File browser modal styles - specific override without breaking main wizard */
.dataset-wizard-backdrop.file-browser-backdrop {
    z-index: 10500;
    background: rgba(0, 0, 0, 0.85);
}

.file-browser-backdrop .modal-dialog {
    background: #1c1f2e;
    border-radius: 0.75rem;
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10501;
    pointer-events: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.file-browser-backdrop .modal-body {
    pointer-events: auto;
}

.file-browser-backdrop button,
.file-browser-backdrop input,
.file-browser-backdrop .list-group-item {
    pointer-events: auto;
}

/* Fixed height container to prevent scrollbar flicker */
.directory-list-container {
    height: 400px;
    min-height: 400px;
    max-height: 400px;
    overflow-y: scroll;
    overflow-x: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.375rem;
    padding: 0.5rem;
}

.directory-list-container .list-group-item {
    background: rgba(32, 36, 50, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    margin-bottom: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
    min-width: 0;
    flex-wrap: nowrap;
}

.directory-list-container .list-group-item > div {
    min-width: 0;
    overflow: hidden;
}

.directory-list-container .list-group-item > div:first-child {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.directory-list-container .list-group-item > div:last-child {
    flex-shrink: 0;
}

.directory-list-container .list-group-item:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateX(4px);
}

.directory-list-container .list-group-item.active {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
}

.directory-list-container .badge {
    font-size: 0.75rem;
}

/* Crop style options - compact buttons */
.crop-style-option {
    padding: 1rem 0.75rem;
    border-radius: 0.5rem;
    background: rgba(32, 36, 50, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.crop-style-option i {
    font-size: 1.75rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s;
}

.crop-style-option span {
    font-size: 0.875rem;
    font-weight: 500;
}

.crop-style-option:hover {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(32, 36, 50, 1);
    transform: translateY(-2px);
}

.crop-style-option.selected {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.crop-style-option.selected i {
    color: #38bdf8;
}

/* Aspect bucket bubbles */
.aspect-buckets-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 2rem;
}

.aspect-bucket-bubble {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(56, 189, 248, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #38bdf8;
    padding: 0.375rem 0.75rem;
    border-radius: 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.aspect-bucket-remove {
    background: none;
    border: none;
    color: #38bdf8;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    transition: color 0.2s;
}

.aspect-bucket-remove:hover {
    color: #ef4444;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dataset-wizard-modal .wizard-progress {
        padding: 1rem;
    }

    .dataset-wizard-modal .step-label {
        display: none;
    }

    .dataset-wizard-modal {
        max-width: 100%;
        margin: 0;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .dataset-wizard-modal .backend-card {
        padding: 1rem;
    }

    .dataset-wizard-modal .backend-icon {
        font-size: 2rem;
    }
}
